//
//  PointMode.m
//  dataGathering
//
//  Created by macmini on 15/3/16.
//  Copyright (c) 2015年 shuili. All rights reserved.
//

#import "PointMode.h"

@interface PointMode ()
@property(nonatomic, retain)AGSPoint* beginPoint;

@end

@implementation PointMode

-(instancetype)initWithMapview :(AGSMapView*)mapview
{
    return [super initWithMapview:mapview];
}

-(void)mapView:(AGSMapView *)mapView didClickAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint features:(NSDictionary *)features
{
    
    [self.myPoint updateWithX:[mappoint x] y:[mappoint y]];
    
    self.myGraphic.geometry = self.myPoint;
    
    [self stop];
    
    if (self.delegate && [self.delegate respondsToSelector:@selector(BaseMode:didFinishDrawing::)]) {
        [self.delegate BaseMode:self didFinishDrawing:self.myPoint :@"POINT"];
    }
    
}

@end
